package com.topc.platform.api;

import com.topc.base.api.CommonResult;
import com.topc.platform.model.vo.IndexCarouselShowVo;
import com.topc.platform.service.CarouselInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/open/carousel")
public class CarouselOpenController {

    @Autowired
    private CarouselInfoService carouselInfoService;

    @GetMapping("/show")
    public CommonResult<List<IndexCarouselShowVo>>  getIndexCarouselShowVoList(){
        List<IndexCarouselShowVo> carouselShowVos =  carouselInfoService.getIndexCarouselShowVoList();
        return CommonResult.success(carouselShowVos);
    }

}
